"getopt" is a function that was in the stdlib of the UNIX I've been using (SunOS). A small number of UNIX programs depend on it. I hacked up a quick version, that, who knows, someone might find useful for parsing command-line options during the early stage of a UNIX->Mac port. Terrible commenting, not much docs, but if you need to use it, you probably know what it does.